<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:sinox="http://www.sinosoft.com.cn/sinox"
	xmlns:p="http://primefaces.org/ui">
	
	<ui:decorate template="/layout/input/editable-template.xhtml">
		<!-- 第一行 -->
		<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
			<ui:param name="compType" value="single-all" />
			<ui:param name="compBean1Id" value="tagElementLists" />
			<ui:param name="compBean1Editable" value="false" />
			
			<ui:define name="compBean1Content">
				<p:toolbar height="22px" styleClass="sino-toolbar-on-datatable">
					<p:toolbarGroup align="left">
				    	<div style="float:left;">
				    		<p:spacer width="10" height="25" />
				    	</div>
				    	<div style="float:left;margin-top:5px;">
				    		<h:outputText value="标签元素集列表"/>
				    	</div>
				    </p:toolbarGroup>
				    
				    <p:toolbarGroup align="right">
				    	<p:commandButton title="添加" value="添加"
							actionListener="#{documentManageAction.addTagElementAction}"
							update="#{compBean1Id}">
							<h:inputHidden value="#{partViewBean.id}" />
						</p:commandButton>
						
						<p:commandButton title="删除" value="删除"
							actionListener="#{documentManageAction.removeTagElementAction}"
							update="#{compBean1Id}">
							<h:inputHidden value="#{partViewBean.id}" />
						</p:commandButton>
				    </p:toolbarGroup>
				</p:toolbar>
				
				<p:dataTable id="#{compBean1Id}" var="te" value="#{partViewBean.tagElementList}"
			        emptyMessage="请添加标签元素" selectionMode="multiple"
			        selection="#{partViewBean.selectTagElement}">
			  		
			  		<p:column headerText="标签元素id" style="width:20px;">
			  			<p:cellEditor>  
			                <f:facet name="output">  
			                    <h:outputText value="#{te.tagId}" />  
			                </f:facet>  
			                <f:facet name="input">  
			                    <h:inputText value="#{te.tagId}" style="width:100%"/>  
			                </f:facet>
			            </p:cellEditor>
					</p:column>
					
					<p:column headerText="标签元素类型" style="width:50px;">
						<p:cellEditor>  
			                <f:facet name="output">  
			                    <h:outputText value="#{te.tagTypeName}" />  
			                </f:facet>  
			                <f:facet name="input">
								<h:selectOneMenu value="#{te.tagType}" style="width:100%;" width="150">  
							        <f:selectItems value="#{te.tagTypeList}" />
							    </h:selectOneMenu> 
			                </f:facet>
			            </p:cellEditor>
					</p:column> 
					
					<p:column headerText="标签元素名称" style="width:50px;">
						<p:cellEditor>  
			                <f:facet name="output">  
			                    <h:outputText value="#{te.title}" />  
			                </f:facet>  
			                <f:facet name="input">  
			                    <h:inputText value="#{te.title}" style="width:100%"/>  
			                </f:facet>
			            </p:cellEditor>
					</p:column>
					 
			  		 <p:column headerText="编辑" style="width:20px;">  
			            <p:rowEditor />  
			        </p:column>
			    </p:dataTable>
			</ui:define>
		</ui:decorate>
		
	</ui:decorate>
</ui:composition>